<?php
/**
 * 随机产生复杂的密码
 */
function MakePass($length) {
	$possible = "0123456789!@#$%^&*()_+".
		"abcdefghijklmnopqrstuvwxyz".
		"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	$str = "";
	while(strlen($str) < $length) {
		$str .= substr($possible, (rand() % strlen($possible)), 1);
	}
	return($str);
}


echo MakePass(8);
?>
